package com.haredot.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Menu implements Serializable {
    @Serial
    private static final long serialVersionUID = 8795481184919662565L;

    private Long id;

    /**
    * 菜单名
    */
    @NotEmpty(message = "菜单名不允许为空")
    private String menuName;

    /**
    * 图标
    */
    @NotEmpty(message = "图标不能为空")
    private String icon;

    /**
    * 排序值
    */
    @NotNull(message = "排序数字不能为空")
    private Integer sort;

    /**
    * 描述信息
    */
    private String description;

    /**
    * 状态
    */
    @NotNull(message = "菜单状态不能为空")
    private Boolean state;

    /**
    * 录入时间
    */
    private LocalDateTime createTime;

    /**
    * 修改时间
    */
    private LocalDateTime updateTime;

    /**
    * 删除标记
    */
    private Boolean del;
}